﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Longtop.Web.SaleWeb.Home.IndexModel>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>

    <link href="../../Content/css/layout.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        $(document).ready(function() {
            $(".stuff_list table").find("tr:odd td").css("background", "#fff");
        })
    </script>

    <script type="text/ecmascript">
        function change() {
            if ($i == $z) {
                $i = 0;
            }
            $j = $i;
            $(".num a").eq($j).attr("class", "num_on").siblings().removeClass("num_on");
            $(".flash_list a").eq($j).fadeIn(1000);
            $(".flash_list a").eq($j).siblings().css("display", "none");
            $i = $i + 1;
        }
        $(function() {
            $i = 1;
            $z = $(".flash_list a").length;
            $set = setInterval("change()", 6000);
            $(".num a").click(function() {
                clearInterval($set);
                $i = $(".num a").index($(this));
                change();
                $set = setInterval("change()", 6000);
            })

        })

    </script>

    <title>
        <%=Model.ApplicationName %></title>
</head>
<body>
    <div id="wrap">
        <div id="head">
            <h1>
                <a href="/"></a>
            </h1>
            <div class="h_top">
                <%Html.RenderPartial("LogOnUserControl"); %>
            </div>
        </div>
        <div id="nav">
            <ul>
                <li><a href="/">首 页</a></li>
                <li>
                    <%=Html.ActionLink("公 告", "notice", new { area = "bbs", controller = "go" }, new { target="_blank"})%>
                </li>
                <li>
                    <%=Html.ActionLink("流程指导", "workflow", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
                <li>
                    <%=Html.ActionLink("产品知识", "knowledge", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
                <li>
                    <%=Html.ActionLink("战 绩", "achievement", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
                <li>
                    <%=Html.ActionLink("明星展示", "star", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
                <li>
                    <%=Html.ActionLink("FAQ", "faq", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
                <li>
                    <%=Html.ActionLink("互宇生活", "life", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                </li>
            </ul>
            <p>
                <%=DateTime.Now.ToString("yyyy年mm月dd日") %>
                <span>
                    <%=System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetDayName(DateTime.Now.DayOfWeek)%>
                </span>
                <%=DateTime.Now.ToString("HH:mm") %></p>
        </div>
        <!--图片滚动开始-->
        <div id="banner">
            <div class="chan">
                <a href="http://www.longtop.com">东南融通</a></div>
            <div class="chan" id="c1">
                <a href="#">销售产品系列</a></div>
            <div class="chan" id="c2">
                <a href="#">咨询服务中心</a></div>
            <div class="flash1">
                <div class="flash_list">
                    <a href="#" class="block">
                        <img src="../../Content/images/banner.jpg" alt="" /></a> <a href="#">
                            <img src="../../Content/images/banner.jpg" alt="" /></a> <a href="#">
                                <img src="../../Content/images/banner.jpg" alt="" /></a> <a href="#">
                                    <img src="../../Content/images/banner.jpg" alt="" /></a> <a href="#">
                                        <img src="../../Content/images/banner.jpg" alt="" /></a></div>
                <div class="num">
                    <a href="javascript:void(0)" class="num_on"></a><a href="javascript:void(0)"></a>
                    <a href="javascript:void(0)"></a>
                </div>
            </div>
            <!--图片滚动结束-->
        </div>
        <div class="roll">
            <div class="pro_change">
                <div id="changepage">
                    <div id="inside">
                        <div id="changepic">
                            <% foreach (var item in Model.ScrollTopics) {%>
                            <p class="p_1">
                                <%=Html.ActionLink(item.Title, "topic", new { area = "bbs", id = item.Tid })%>
                            </p>
                            <%} if (Model.ScrollTopics.Count == 0) { %>
                            <p class="p_1">
                                暂无数据</p>
                            <%} %>
                        </div>
                        <div id="changepic2">
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>

                <script type="text/javascript">
<!--
                    var speed = 40;
                    var tab = document.getElementById("changepage");
                    var tab1 = document.getElementById("changepic");
                    var tab2 = document.getElementById("changepic2");
                    tab2.innerHTML = tab1.innerHTML;
                    function Marquee() {
                        if (tab2.offsetWidth - tab.scrollLeft <= 0)
                            tab.scrollLeft -= tab1.offsetWidth
                        else {
                            tab.scrollLeft++;
                        }
                    }
                    var MyMar = setInterval(Marquee, speed);
                    tab.onmouseover = function() { clearInterval(MyMar) };
                    tab.onmouseout = function() { MyMar = setInterval(Marquee, speed) };
-->
                </script>

            </div>
        </div>
        <div id="main">
            <div class="main_left">
                <h2 class="title">
                    <%=Html.ActionLink("明星展示", "star", new { area = "bbs", controller = "go" }, new { target = "_blank" })%></h2>
                <div class="left_content">
                    <h3>
                        <a href="<%=Url.Action("sale", new { area = "bbs",controller="go" } )%>" target="_blank">
                            <img src="../../Content/images/title_1.gif" alt="" /></a>
                    </h3>
                    <%foreach (var item in Model.StarSales) {
                    %>
                    <div class="person">
                        <div class="photo">
                            <%if (item.Avatar.IsNotEmpty()) { %>
                            <%=Html.Image(item.Avatar)%>
                            <%} %>
                        </div>
                        <div class="intro">
                            员工：<%=item.Name%><br />
                            部门：<%foreach (var d in item.Departments) {
                            %>
                            <%=d.Text %>
                            <%
                                } %>
                            <br />
                            格言：<%=item.Maxim %>
                            <%=Html.ActionLink(">>相关介绍", "sale", new { area = "bbs", controller = "go",id=item.BbsUser.Uid }, new { target="_blank"})%>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <% 
                        } %>
                    <%--<div class="person">
                        <div class="photo">
                            <img src="../../Content/images/pic_1.jpg" alt="" />
                        </div>
                        <div class="intro">
                            员工：张晓明<br />
                            部门：在线直销二部<br />
                            格言：突破自我，勇 攀高峰... <a href="#" target="_blank">&gt;&gt;相关介绍</a></div>
                        <div class="clear">
                        </div>
                    </div>
                    <h3>
                        <a href="<%=Url.Action("department", new { controller="go",area = "bbs" })%>" target="_blank">
                            <img src="../../Content/images/title_2.gif" alt="" /></a></h3>
                    <%foreach (var item in Model.StarLeaders) {
                    %>
                    <div class="person">
                        <div class="photo">
                            <%=Html.Image(item.Avatar)%>
                        </div>
                        <div class="intro">
                            员工：<%=item.Name%><br />
                            部门：<%=string.Join(",",item.Departments.Select(d=>d.Text).ToArray()) %>
                            <br />
                            格言：<%=item.Maxim%>
                            <%=Html.ActionLink(">>相关介绍", "aboutsale", new { area = "bbs", controller = "go" }, new { target = "_blank" })%>
                        </div>
                        <div class="clear">
                        </div>
                    </div>
                    <%} %>
                    <%--           <h3>
                        <a href="#">
                            <img src="../../Content/images/title_3.gif" alt="" /></a></h3>
                    <div class="person">
                        <div class="photo">
                            <img src="../../Content/images/pic_1.jpg" alt="" />
                        </div>
                        <div class="intro">
                            区总监：张晓明<br />
                            营业区：在线直销二部<br />
                            格言：突破自我，勇 攀高峰... <a href="#" target="_blank">&gt;&gt;相关介绍</a></div>
                        <div class="clear">
                        </div>
                    </div>
                    <div class="person">
                        <div class="photo">
                            <img src="../../Content/images/pic_1.jpg" alt="" />
                        </div>
                        <div class="intro">
                            区总监：张晓明<br />
                            营业区：在线直销二部<br />
                            格言：突破自我，勇 攀高峰... <a href="#" target="_blank">&gt;&gt;相关介绍</a></div>
                        <div class="clear">
                        </div>
                    </div>--%>
                </div>
            </div>
            <div class="main_middle">
                <div class="m_middle">
                    <h2 class="title">
                        公告栏
                        <%=Html.ActionLink(">> 更多", "notice", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%>
                    </h2>
                    <div class="public">
                        <ul>
                            <%foreach (var item in Model.NoticeTopics) {
                            %>
                            <li>
                                <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                                <span>
                                    <%=item.Postdatetime%>
                                </span></li>
                            <%
                              
                                } %>
                        </ul>
                    </div>
                </div>
                <div class="m_left">
                    <h2 class="title">
                        产品知识
                        <%=Html.ActionLink(">> 更多", "knowledge", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%>
                    </h2>
                    <div class="pro">
                        <ul>
                            <%foreach (var item in Model.KnowledgeTopics) {
                            %>
                            <li>
                                <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                                <span>
                                    <%=item.Postdatetime%>
                                </span></li>
                            <%} %>
                        </ul>
                    </div>
                </div>
                <div class="m_right">
                    <h2 class="title">
                        流程指导
                        <%=Html.ActionLink(">> 更多", "workflow", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%>
                    </h2>
                    <div class="pro">
                        <ul>
                            <%foreach (var item in Model.WorkflowTopics) {
                            %>
                            <li>
                                <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                                <span>
                                    <%=item.Postdatetime%>
                                </span></li>
                            <%} %>
                        </ul>
                    </div>
                </div>
                <div class="clear">
                </div>
                <div class="m_left">
                    <h2 class="title">
                        FAQ
                        <%=Html.ActionLink(">> 更多", "faq", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%>
                    </h2>
                    <div class="pro">
                        <ul>
                            <%foreach (var item in Model.FaqTopics) {
                            %>
                            <li>
                                <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                                <span>
                                    <%=item.Postdatetime%>
                                </span></li>
                            <%} %>
                        </ul>
                    </div>
                </div>
                <div class="m_right">
                    <h2 class="title">
                        互宇生活
                        <%=Html.ActionLink(">> 更多", "life", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%>
                    </h2>
                    <div class="pro">
                        <ul>
                            <%foreach (var item in Model.LifeTopics) {
                            %>
                            <li>
                                <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                                <span>
                                    <%=item.Postdatetime%>
                                </span></li>
                            <%} %>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="main_right">
                <div class="news" id="report">
                    <h2 class="m_title">
                        <span>战&nbsp;报</span>
                        <%=Html.ActionLink(">> 详细", "report", new { area = "bbs", controller = "go" }, new { target = "_blank", Class = "more" })%></h2>
                    <%foreach (var item in Model.ReportTopics) {
                    %>
                    <div style="display: none">
                        <%=Html.ActionLink(item.Title, "topic", new { controller = "go", area = "bbs", id = item.Tid }, new { target = "_blank" })%>
                        <span>
                            <%=item.Title%>
                        </span>
                    </div>
                    <% } %>
                    <div style="display: none">
                        <span>1 </span>
                    </div>
                    <div style="display: none">
                        <span>2</span>
                    </div>
                    <div style="display: none">
                        <span>3</span>
                    </div>
                    <div style="display: none">
                        <span>4</span>
                    </div>
                    <div style="display: none">
                        <span>5</span>
                    </div>
                    <div style="display: none">
                        <span>6</span>
                    </div>
                </div>
                <div class="r_middle">
                    <h2 class="title">
                        员 工</h2>
                    <div class="stuff">
                        <div class="stuff_list">
                            <table>
                                <tr>
                                    <th>
                                        姓 名
                                    </th>
                                    <th>
                                        所在部门
                                    </th>
                                    <th>
                                        本月月绩
                                    </th>
                                </tr>
                                <%foreach (var item in Model.Sales) {
                                %>
                                <tr>
                                    <td>
                                        <%=item.Name %>
                                    </td>
                                    <td>
                                        <%=string.Join(",", item.Departments.Select(d=>d.Text).ToArray())%>
                                    </td>
                                    <td>
                                        <span>
                                            <%=item.GetMonthAchieve(null) %>
                                        </span>
                                    </td>
                                </tr>
                                <% 
                                    } %>
                            </table>
                        </div>
                    </div>
                </div>
                <%--<div class="r_middle">
                    <h2 class="title">
                        部 门</h2>
                    <div class="stuff">
                        <div class="stuff_list">
                            <h3>
                                <img src="../../Content/images/r_t1.gif" alt="" /></h3>
                            <table>
                                <tr>
                                    <th>
                                        部 门
                                    </th>
                                    <th>
                                        部门经理
                                    </th>
                                    <th>
                                        本月月绩
                                    </th>
                                </tr>
                                <%foreach (var d in Model.RedDepartments) {
                                %>
                                <tr>
                                    <td>
                                        <%=d.Text %>
                                    </td>
                                    <td>
                                        <%=d.GetLeaders() %>
                                    </td>
                                    <td>
                                        <span>
                                            <%=d.GetMonthAchievement() %></span>
                                    </td>
                                </tr>
                                <%
                                    } %>
                            </table>
                            <h3>
                                <img src="../../Content/images/r_t2.gif" alt="" /></h3>
                            <table>
                                <%foreach (var d in Model.BlackDepartments) {
                                %>
                                <tr>
                                    <td>
                                        <%=d.Text %>
                                    </td>
                                    <td>
                                        <%=d.GetLeaders()%>
                                    </td>
                                    <td>
                                        <span>
                                            <%=d.GetMonthAchievement() %></span>
                                    </td>
                                </tr>
                                <%
                                    } %>
                            </table>
                        </div>
                    </div>
                </div>--%>
                <%--<div class="r_middle">
                    <h2 class="title">
                        区</h2>
                    <div class="stuff">
                        <div class="stuff_list">
                            <table class="part">
                                <tr>
                                    <th>
                                        营业区
                                    </th>
                                    <th>
                                        区总监
                                    </th>
                                    <th>
                                        本月月绩
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        张晓明
                                    </td>
                                    <td>
                                        在线直销二部
                                    </td>
                                    <td>
                                        <span>12000元</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>--%>
            </div>
            <div class="clear">
            </div>
        </div>
        <div id="link">
            <h2 class="title">
                快捷通道</h2>
            <div class="link_list">
                <a href="http://images.baidu.com" target="_blank">
                    <img src="../../Content/images/link/1.jpg" alt="" /></a> <a href="#">
                        <img src="../../Content/images/link/2.jpg" alt="" /></a> <a href="#">
                            <img src="../../Content/images/link/3.jpg" alt="" /></a> <a href="#">
                                <img src="../../Content/images/link/4.jpg" alt="" /></a> <a href="http://www.alibaba.com"
                                    target="_blank">
                                    <img src="../../Content/images/link/5.jpg" alt="" />
                                </a><a href="http://www.hooyoo.com" target="_blank">
                                    <img src="../../Content/images/link/6.jpg" alt="" /></a> <a href="http://www.longtop.com"
                                        target="_blank">
                                        <img src="../../Content/images/link/7.jpg" alt="" /></a>
            </div>
        </div>
        <div id="bottom">
            Copyright &copy; 2007 - 2009, 互宇信息科技有限公司版权所有 - 互宇 闽ICP备08002160号</div>
    </div>

    <script type="text/javascript">
        var reports = $('#report div:hidden');
        var nextLength = 10;
        reports.fadeNext = function() {
            var current = reports.filter(':visible');
            if (current.get(0)) {
                var index = reports.index(current);
                index = index <reports.size() ? index + 1 : 0;
                current.fadeOut(1000, function() {
                    nextLength = reports.eq(index).fadeIn(1000).find('span').text().length;
                });
            }
            else
                reports.eq(0).fadeIn(1000);
        };
        reports.fadeNext();
        setInterval(reports.fadeNext, 5000 + 150 * Math.sqrt(nextLength));
        reports.bind('click', function() {
            reports.fadeNext();
        });
    </script>

</body>
</html>
